/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlValue;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.source.entity.image.EleSourceImageGroup;
import com.thinkgem.jeesite.modules.source.entity.video.EleSourceVideoGroup;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * 多媒体资源Entity
 * @author unnamed
 * @version 2017-07-10
 */
@XmlRootElement(name="multimedia")
@XmlAccessorType(XmlAccessType.NONE)
public class EleSourceMultimedia extends DataEntity<EleSourceMultimedia> {
	
	private static final long serialVersionUID = 1L;
	private String name;
	
	@XmlAttribute
	private String type;		// type
	
	
	private String videoId;		// video_id
	private String imageId;		// image_id

	private EleSourceImageGroup imageGroup = null;
	private EleSourceVideoGroup videoGroup = null;
	
	private String groupId;
	
	private EleSourceGroup group;
	
	public List<User> users = null;

	@XmlTransient
	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
	@XmlTransient
	public EleSourceGroup getGroup() {
		return group;
	}

	public void setGroup(EleSourceGroup group) {
		this.group = group;
	}
	@XmlTransient
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public EleSourceMultimedia() {
		super();
	}

	public EleSourceMultimedia(String id){
		super(id);
	}
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	@XmlElement(name="imagecfg")
	public EleSourceImageGroup getImageGroup() {
		return imageGroup;
	}
	public void setImageGroup(EleSourceImageGroup imageGroup) {
		this.imageGroup = imageGroup;
	}
	@XmlElement(name="videocfg")
	public EleSourceVideoGroup getVideoGroup() {
		return videoGroup;
	}

	public void setVideoGroup(EleSourceVideoGroup videoGroup) {
		this.videoGroup = videoGroup;
	}



	@XmlTransient
	@Length(min=0, max=100, message="video_id长度必须介于 0 和 100 之间")
	public String getVideoId() {
		return videoId;
	}

	public void setVideoId(String videoId) {
		this.videoId = videoId;
	}
	@XmlTransient
	@Length(min=0, max=100, message="image_id长度必须介于 0 和 100 之间")
	public String getImageId() {
		return imageId;
	}

	public void setImageId(String imageId) {
		this.imageId = imageId;
	}
	@XmlTransient
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}